<?php

use App\Http\Controllers\admin\ApproveController;
use App\Http\Controllers\admin\ApproveProcessesController;
use App\Http\Controllers\admin\CapitalizeController;
use App\Http\Controllers\admin\CertController;
use App\Http\Controllers\admin\CompanyController;
use App\Http\Controllers\admin\CompletionController;
use App\Http\Controllers\admin\ConstructionDiaryController;
use App\Http\Controllers\admin\ContractController;
use App\Http\Controllers\admin\DifficultyController;
use App\Http\Controllers\admin\DisclosureController;
use App\Http\Controllers\admin\DisclosureTypeController;
use App\Http\Controllers\admin\DownController;
use App\Http\Controllers\admin\HazardController;
use App\Http\Controllers\admin\ImprestController;
use App\Http\Controllers\admin\InformationController;
use App\Http\Controllers\admin\LaborContrastController;
use App\Http\Controllers\admin\LaborController;
use App\Http\Controllers\admin\LaborTemplateController;
use App\Http\Controllers\admin\LabourerController;
use App\Http\Controllers\admin\LeaveController;
use App\Http\Controllers\admin\MaterialContrastController;
use App\Http\Controllers\admin\MaterialController;
use App\Http\Controllers\admin\MaterialDeliveryController;
use App\Http\Controllers\admin\MaterialDetailController;
use App\Http\Controllers\admin\MaterialTemplateController;
use App\Http\Controllers\admin\NotifyController;
use App\Http\Controllers\admin\OtherController;
use App\Http\Controllers\admin\PaymentApplyController;
use App\Http\Controllers\admin\PostController;
use App\Http\Controllers\admin\RoleController;
use App\Http\Controllers\admin\ProjectController;
use App\Http\Controllers\admin\ProjectCostController;
use App\Http\Controllers\admin\ProjectPresentController;
use App\Http\Controllers\admin\QualityController;
use App\Http\Controllers\admin\QualityTypeController;
use App\Http\Controllers\admin\ReferenceManualController;
use App\Http\Controllers\admin\ReferenceMaterialController;
use App\Http\Controllers\admin\ReimburseController;
use App\Http\Controllers\admin\ResourceController;
use App\Http\Controllers\admin\RiskController;
use App\Http\Controllers\admin\RoleUserController;
use App\Http\Controllers\admin\SafeController;
use App\Http\Controllers\admin\SafeTypeController;
use App\Http\Controllers\admin\SceneController;
use App\Http\Controllers\admin\ScheduleController;
use App\Http\Controllers\admin\ScheduleTypeController;
use App\Http\Controllers\admin\StampController;
use App\Http\Controllers\admin\StatisticsController;
use App\Http\Controllers\admin\SuggestController;
use App\Http\Controllers\admin\SupplierController;
use App\Http\Controllers\admin\TeamController;
use App\Http\Controllers\admin\UserAuthController;
use App\Http\Controllers\admin\UserController;
use App\Http\Controllers\admin\WarehouseController;
use App\Http\Controllers\UploadController;
use App\Http\Controllers\UserController as AppUserController;
use App\Http\Controllers\ScheduleController as AppScheduleController;
use App\Http\Controllers\DisclosureController as AppDisclosureController;
use Illuminate\Http\Request;
use Illuminate\Support\Facades\Route;

/*
|--------------------------------------------------------------------------
| API Routes
|--------------------------------------------------------------------------
|
| Here is where you can register API routes for your application. These
| routes are loaded by the RouteServiceProvider within a group which
| is assigned the "api" middleware group. Enjoy building your API!
|
*/

Route::middleware('auth:sanctum')->get('/user', function (Request $request) {
    return $request->user();
});

Route::post('/login', [AppUserController::class, 'login']);
Route::group(['middleware' => ['auth:api']], function () {
    Route::post('/user', [AppUserController::class, 'index']);

    Route::post('/schedule', [AppScheduleController::class, 'index']);
    Route::get('/schedule/{id}', [AppScheduleController::class, 'show']);

    Route::get('/disclosure/{id}', [AppDisclosureController::class, 'show']);
    Route::post('/disclosure', [AppDisclosureController::class, 'index']);
});

Route::group(['prefix' => 'admin'], function () {
    Route::get('/A', [UserController::class, 'getA']);
    Route::post('/login', [UserController::class, 'login']);
    Route::post('/register', [UserController::class, 'register']);

    Route::group(['middleware' => ['auth:api']], function () {
        Route::get('/uploadToken', [UploadController::class, 'getToken']);

        Route::get('/user/{id}', [UserController::class, 'show']);
        Route::post('/user', [UserController::class, 'index']);

        Route::get('/posts/{id}', [PostController::class, 'show']);
        Route::post('/posts', [PostController::class, 'index']);
        Route::post('/posts/board', [PostController::class, 'board']);
        Route::put('/posts', [PostController::class, 'store']);
        Route::patch('/posts', [PostController::class, 'update']);
        Route::delete('/posts/{id}', [PostController::class, 'delete']);


        Route::post('/user/certs', [UserController::class, 'certs']);
        Route::post('/user/all', [UserController::class, 'all']);
        Route::post('/user/attendance', [UserController::class, 'attendance']);
        Route::post('/user/payment', [UserController::class, 'payment']);
        Route::put('/user', [UserController::class, 'store']);
        Route::patch('/user', [UserController::class, 'update']);
        Route::patch('/user/status', [UserController::class, 'status']);
        Route::delete('/user/{id}', [UserController::class, 'delete']);
        Route::post('/showProjectUser/{id}', [UserController::class, 'showProjectUser']);
        Route::post('/userBindProject', [UserController::class, 'userBindProject']);
        Route::post('/deleteBind', [UserController::class, 'deleteBind'])->middleware('CheckProject');
        Route::patch('/user/bindProjectRole', [UserController::class, 'bindProjectRole'])->middleware('CheckProject');
        Route::patch('/user/userBindProjectRole', [UserController::class, 'userBindProjectRole'])->middleware('CheckProject');
        Route::patch('/user/userBindProject/cert', [UserController::class, 'userBindProjectCert'])->middleware('CheckProject');

        Route::get('/userEdu/{id}', [UserController::class, 'edu']);
        Route::put('/user/edu', [UserController::class, 'storeEdu']);
        Route::patch('/user/edu', [UserController::class, 'updateEdu']);
        Route::delete('/user/edu/{id}', [UserController::class, 'deleteEdu']);

        Route::post('/user/auth', [UserAuthController::class, 'index']);
        Route::put('/user/auth', [UserAuthController::class, 'store']);
        Route::patch('/user/auth', [UserAuthController::class, 'update']);

        Route::post('/user/wage', [UserController::class, 'wage']);
        Route::put('/user/wage', [UserController::class, 'storeWage']);
        Route::patch('/user/wage', [UserController::class, 'updateWage']);

        Route::post('/user/imprest', [UserController::class, 'imprest']);

        Route::get('/labourer/{id}', [LabourerController::class, 'show']);
        Route::post('/labourer/attendance', [LabourerController::class, 'attendance']);
        Route::post('/labourer', [LabourerController::class, 'index']);
        Route::post('/labourer/all', [LabourerController::class, 'all']);
        Route::post('/labourer/costs', [LabourerController::class, 'costs']);
        Route::put('/labourer', [LabourerController::class, 'store']);
        Route::patch('/labourer', [LabourerController::class, 'update']);

        Route::get('/labourerWage/{id}', [LabourerController::class, 'wageShow']);
        Route::post('/labourer/wage', [LabourerController::class, 'wage']);
        Route::put('/labourer/wage', [LabourerController::class, 'storeWage']);
        Route::patch('/labourer/wage', [LabourerController::class, 'updateWage']);


        Route::get('/role/{id}', [RoleController::class, 'show']);
        Route::post('/role', [RoleController::class, 'index']);
        Route::post('/role/all', [RoleController::class, 'all']);
        Route::put('/role', [RoleController::class, 'store']);
        Route::patch('/role', [RoleController::class, 'update']);
        Route::patch('/role/status', [RoleController::class, 'status']);
        Route::delete('/role/{id}', [RoleController::class, 'delete']);

        // Route::post('/role/bindUser', [RoleController::class, 'roleBindUser']);
        // Route::put('/role/bindUser', [RoleController::class, 'storeRoleBindUser']);
        // Route::patch('/role/bindUser', [RoleController::class, 'updateRoleBindUser']);
        // Route::delete('/role/bindUser/{id}', [RoleController::class, 'deleteRoleBindUser']);

        Route::get('/roleUser/{id}', [RoleUserController::class, 'show']);
        Route::post('/role/user', [RoleUserController::class, 'index']);
        Route::post('/role/roleUser', [RoleUserController::class, 'roleUser']);

        Route::put('/role/user', [RoleUserController::class, 'store']);
        Route::patch('/role/user', [RoleUserController::class, 'update'])->middleware('CheckAdministrator');
        Route::delete('/role/user/{id}', [RoleUserController::class, 'delete'])->middleware('CheckAdministrator');


        Route::get('/company/{id}', [CompanyController::class, 'show']);
        Route::post('/company', [CompanyController::class, 'index']);
        Route::put('/company', [CompanyController::class, 'store']);
        Route::patch('/company', [CompanyController::class, 'update']);
        Route::patch('/company/status', [CompanyController::class, 'status']);
        Route::delete('/company/{id}', [CompanyController::class, 'delete']);

        Route::get('/project/{id}', [ProjectController::class, 'show']);
        Route::post('/project', [ProjectController::class, 'index']);
        Route::post('/project/selectList', [ProjectController::class, 'selectList']);
        Route::put('/project', [ProjectController::class, 'store'])->middleware('CheckAdministrator');
        Route::patch('/project', [ProjectController::class, 'update'])->middleware('CheckAdministrator');
        Route::patch('/project/summary', [ProjectController::class, 'updateSummary']);
        Route::put('/bind/team', [ProjectController::class, 'bindTeamStore']);
        Route::post('/bind/team', [ProjectController::class, 'bindTeam']);
        Route::post('/project/team/delete', [ProjectController::class, 'bindTeamDelete']);
        Route::patch('/project/status', [ProjectController::class, 'status']);
        Route::delete('/project/{id}', [ProjectController::class, 'delete'])->middleware('CheckAdministrator');



        Route::post('/project/processess', [ProjectController::class, 'processess']);

        Route::get('/projectPresent/{id}', [ProjectPresentController::class, 'show']);
        Route::put('/projectPresent', [ProjectPresentController::class, 'store']);
        Route::patch('/projectPresent', [ProjectPresentController::class, 'update']);

        Route::post('/projectCost', [ProjectCostController::class, 'index']);
        Route::patch('/projectCost', [ProjectCostController::class, 'edit']);

        Route::post('/projectInvoice/info', [ProjectController::class, 'projectInvoiceInfo']);
        Route::post('/projectInvoice', [ProjectController::class, 'projectInvoice'])->middleware('CheckProject');
        Route::put('/projectInvoice', [ProjectController::class, 'storeProjectInvoice'])->middleware('CheckProject');
        Route::patch('/projectInvoice', [ProjectController::class, 'updateProjectInvoice'])->middleware('CheckProject');
        Route::delete('/projectInvoice/{id}', [ProjectController::class, 'deleteProjectInvoice']);
        Route::patch('/projectInvoice/reviewer', [ProjectController::class, 'invoiceReviewer'])->middleware('CheckProject');


        Route::post('/projectUser', [ProjectController::class, 'projectUser']);
        Route::post('/getProjectUser', [ProjectController::class, 'getProjectUser']);
        Route::post('/projectUserCost', [ProjectController::class, 'projectUserCost']);
        Route::put('/projectUserCost', [ProjectController::class, 'projectUserCostInsert']);
        Route::patch('/projectUserCost', [ProjectController::class, 'projectUserCostEdit']);
        Route::post('/projectIsUser', [ProjectController::class, 'projectIsUser']);
        Route::post('/projectBindUser', [ProjectController::class, 'projectBindUser']);

        Route::get('/contract/{id}', [ContractController::class, 'show']);
        Route::post('/contract', [ContractController::class, 'index'])->middleware('CheckProject');
        Route::post('/contract/all', [ContractController::class, 'all'])->middleware('CheckProject');
        Route::post('/contract/details/import', [ContractController::class, 'import'])->middleware('CheckProject');
        Route::put('/contract', [ContractController::class, 'store'])->middleware('CheckProject');
        Route::patch('/contract', [ContractController::class, 'update'])->middleware('CheckProject');
        Route::delete('/contract/{id}', [ContractController::class, 'delete']);

        Route::get('/difficulty/{id}', [DifficultyController::class, 'show']);
        Route::post('/difficulty', [DifficultyController::class, 'index'])->middleware('CheckProject');
        Route::put('/difficulty', [DifficultyController::class, 'store'])->middleware('CheckProject');
        Route::patch('/difficulty', [DifficultyController::class, 'update'])->middleware('CheckProject');
        Route::delete('/difficulty/{id}', [DifficultyController::class, 'delete']);
        Route::post('/difficulty/type', [DifficultyController::class, 'types'])->middleware('CheckProject');
        Route::put('/difficulty/type', [DifficultyController::class, 'storeType'])->middleware('CheckProject');
        Route::patch('/difficulty/type', [DifficultyController::class, 'updateType'])->middleware('CheckProject');
        Route::delete('/difficulty/type/{id}', [DifficultyController::class, 'deleteType']);

        Route::get('/risk/{id}', [RiskController::class, 'show']);
        Route::post('/risk', [RiskController::class, 'index'])->middleware('CheckProject');
        Route::put('/risk', [RiskController::class, 'store'])->middleware('CheckProject');
        Route::patch('/risk', [RiskController::class, 'update'])->middleware('CheckProject');
        Route::delete('/risk/{id}', [RiskController::class, 'delete']);
        Route::post('/risk/type', [RiskController::class, 'types'])->middleware('CheckProject');
        Route::put('/risk/type', [RiskController::class, 'storeType'])->middleware('CheckProject');
        Route::patch('/risk/type', [RiskController::class, 'updateType'])->middleware('CheckProject');
        Route::delete('/risk/type/{id}', [RiskController::class, 'deleteType']);


        Route::get('/resource/{id}', [ResourceController::class, 'show']);
        Route::post('/resource', [ResourceController::class, 'index'])->middleware('CheckProject');
        Route::put('/resource', [ResourceController::class, 'store'])->middleware('CheckProject');
        Route::patch('/resource', [ResourceController::class, 'update'])->middleware('CheckProject');
        Route::delete('/resource/{id}', [ResourceController::class, 'delete']);


        Route::get('/schedule/{id}', [ScheduleController::class, 'show']);
        Route::post('/schedule', [ScheduleController::class, 'index'])->middleware('CheckProject');
        Route::post('/schedule/import', [ScheduleController::class, 'import'])->middleware('CheckProject');
        Route::put('/schedule', [ScheduleController::class, 'store'])->middleware('CheckProject');
        Route::patch('/schedule', [ScheduleController::class, 'update'])->middleware('CheckProject');
        Route::delete('/schedule/{id}', [ScheduleController::class, 'delete']);

        Route::post('/schedule/type', [ScheduleTypeController::class, 'index'])->middleware('CheckProject');
        Route::put('/schedule/type', [ScheduleTypeController::class, 'store'])->middleware('CheckProject');
        Route::patch('/schedule/type', [ScheduleTypeController::class, 'update'])->middleware('CheckProject');
        Route::delete('/schedule/type/{id}', [ScheduleTypeController::class, 'delete']);


        Route::get('/disclosure/{id}', [DisclosureController::class, 'show']);
        Route::post('/disclosure', [DisclosureController::class, 'index'])->middleware('CheckProject');
        Route::put('/disclosure', [DisclosureController::class, 'store'])->middleware('CheckProject');
        Route::patch('/disclosure', [DisclosureController::class, 'update'])->middleware('CheckProject');
        Route::delete('/disclosure/{id}', [DisclosureController::class, 'delete']);

        Route::post('/disclosure/type', [DisclosureTypeController::class, 'index'])->middleware('CheckProject');
        Route::put('/disclosure/type', [DisclosureTypeController::class, 'store'])->middleware('CheckProject');
        Route::patch('/disclosure/type', [DisclosureTypeController::class, 'update'])->middleware('CheckProject');
        Route::delete('/disclosure/type/{id}', [DisclosureTypeController::class, 'delete']);


        Route::post('/safe/type', [SafeTypeController::class, 'index'])->middleware('CheckProject');
        Route::get('/safe/type/{id}', [SafeTypeController::class, 'show']);
        Route::put('/safe/type', [SafeTypeController::class, 'store'])->middleware('CheckProject');
        Route::patch('/safe/type', [SafeTypeController::class, 'update'])->middleware('CheckProject');
        Route::delete('/safe/type/{id}', [SafeTypeController::class, 'delete']);

        Route::get('/safe/{id}', [SafeController::class, 'show']);
        Route::post('/safe', [SafeController::class, 'index'])->middleware('CheckProject');
        Route::put('/safe', [SafeController::class, 'store'])->middleware('CheckProject');
        Route::patch('/safe', [SafeController::class, 'update'])->middleware('CheckProject');
        Route::delete('/safe/{id}', [SafeController::class, 'delete']);

        Route::post('/quality/type', [QualityTypeController::class, 'index'])->middleware('CheckProject');
        Route::get('/quality/type/{id}', [QualityTypeController::class, 'show']);
        Route::put('/quality/type', [QualityTypeController::class, 'store'])->middleware('CheckProject');
        Route::patch('/quality/type', [QualityTypeController::class, 'update'])->middleware('CheckProject');
        Route::delete('/quality/type/{id}', [QualityTypeController::class, 'delete']);

        Route::get('/quality/{id}', [QualityController::class, 'show']);
        Route::post('/quality', [QualityController::class, 'index'])->middleware('CheckProject');
        Route::put('/quality', [QualityController::class, 'store'])->middleware('CheckProject');
        Route::patch('/quality', [QualityController::class, 'update'])->middleware('CheckProject');
        Route::delete('/quality/{id}', [QualityController::class, 'delete']);

        Route::get('/notify/{id}', [NotifyController::class, 'show']);
        Route::post('/notify', [NotifyController::class, 'index'])->middleware('CheckProject');
        Route::put('/notify', [NotifyController::class, 'store'])->middleware('CheckProject');
        Route::patch('/notify', [NotifyController::class, 'update'])->middleware('CheckProject');
        Route::delete('/notify/{id}', [NotifyController::class, 'delete']);

        Route::get('/material/{id}', [MaterialController::class, 'show']);
        Route::post('/material', [MaterialController::class, 'index'])->middleware('CheckProject');
        Route::post('/material/cost', [MaterialController::class, 'cost'])->middleware('CheckProject');
        Route::post('/material/contractPayCost', [MaterialController::class, 'contractPayCost'])->middleware('CheckProject');

        Route::put('/material', [MaterialController::class, 'store'])->middleware('CheckProject');
        Route::patch('/material', [MaterialController::class, 'update'])->middleware('CheckProject');
        Route::delete('/material/{id}', [MaterialController::class, 'delete']);

        Route::post('/material/contrast', [MaterialContrastController::class, 'index'])->middleware('CheckProject');
        Route::put('/material/contrast', [MaterialContrastController::class, 'store'])->middleware('CheckProject');
        Route::patch('/material/contrast', [MaterialContrastController::class, 'update'])->middleware('CheckProject');
        Route::delete('/material/contrast/{id}', [MaterialContrastController::class, 'delete']);

        Route::get('/materialContract/{id}', [MaterialController::class, 'contractShow']);
        Route::post('/material/contract', [MaterialController::class, 'contract'])->middleware('CheckProject');
        Route::put('/material/contract', [MaterialController::class, 'storeContract'])->middleware('CheckProject');
        Route::patch('/material/contract', [MaterialController::class, 'updateContract'])->middleware('CheckProject');
        Route::delete('/material/contract/{id}', [MaterialController::class, 'deleteContract']);


        Route::post('/material/template', [MaterialTemplateController::class, 'index']);
        Route::put('/material/template', [MaterialTemplateController::class, 'store']);
        Route::patch('/material/template', [MaterialTemplateController::class, 'update']);

        Route::post('/material/delivery', [MaterialDeliveryController::class, 'index'])->middleware('CheckProject');
        Route::put('/material/delivery', [MaterialDeliveryController::class, 'store'])->middleware('CheckProject');
        Route::patch('/material/delivery', [MaterialDeliveryController::class, 'update'])->middleware('CheckProject');
        Route::delete('/material/delivery/{id}', [MaterialDeliveryController::class, 'delete']);

        Route::get('/warehouse/{id}', [WarehouseController::class, 'show']);
        Route::get('/warehouse_ins/{id}', [WarehouseController::class, 'showIns']);
        Route::get('/warehouse_outs/{id}', [WarehouseController::class, 'showOuts']);
        Route::post('/warehouse', [WarehouseController::class, 'index'])->middleware('CheckProject');
        Route::post('/warehouse/ins', [WarehouseController::class, 'ins'])->middleware('CheckProject');
        Route::post('/warehouse/outs', [WarehouseController::class, 'outs'])->middleware('CheckProject');
        Route::put('/warehouse', [WarehouseController::class, 'store'])->middleware('CheckProject');
        Route::patch('/warehouse', [WarehouseController::class, 'update'])->middleware('CheckProject');
        Route::put('/warehouse/ins', [WarehouseController::class, 'insStore'])->middleware('CheckProject');
        Route::put('/warehouse/outs', [WarehouseController::class, 'outsStore'])->middleware('CheckProject');
        Route::delete('/warehouse/{id}', [WarehouseController::class, 'delete']);


        Route::get('/completion/{id}', [CompletionController::class, 'show']);
        Route::post('/completion', [CompletionController::class, 'index'])->middleware('CheckProject');
        Route::put('/completion', [CompletionController::class, 'store'])->middleware('CheckProject');
        Route::patch('/completion', [CompletionController::class, 'update'])->middleware('CheckProject');
        Route::delete('/completion/{id}', [CompletionController::class, 'delete']);
        // Route::post('/completion/type', [CompletionController::class, 'types'])->middleware('CheckProject');
        // Route::put('/completion/type', [CompletionController::class, 'storeType'])->middleware('CheckProject');
        // Route::patch('/completion/type', [CompletionController::class, 'updateType'])->middleware('CheckProject');
        // Route::delete('/completion/type/{id}', [CompletionController::class, 'deleteType']);

        Route::post('/paymentApply', [PaymentApplyController::class, 'index'])->middleware('CheckProject');
        Route::get('/paymentApply/{id}', [PaymentApplyController::class, 'show']);
        Route::put('/paymentApply', [PaymentApplyController::class, 'store'])->middleware('CheckProject');
        Route::patch('/paymentApply', [PaymentApplyController::class, 'review'])->middleware('CheckProject');

        Route::get('/labor/{id}', [LaborController::class, 'show']);
        Route::post('/labor', [LaborController::class, 'index'])->middleware('CheckProject');
        Route::post('/labor/cost', [LaborController::class, 'cost'])->middleware('CheckProject');
        Route::put('/labor', [LaborController::class, 'store'])->middleware('CheckProject');
        Route::patch('/labor', [LaborController::class, 'update'])->middleware('CheckProject');
        Route::delete('/labor/{id}', [LaborController::class, 'delete']);

        Route::post('/labor/contrast', [LaborContrastController::class, 'index'])->middleware('CheckProject');
        Route::put('/labor/contrast', [LaborContrastController::class, 'store'])->middleware('CheckProject');
        Route::patch('/labor/contrast', [LaborContrastController::class, 'update'])->middleware('CheckProject');
        Route::delete('/labor/contrast/{id}', [LaborContrastController::class, 'delete']);

        Route::get('/laborContract/{id}', [LaborController::class, 'contractShow']);
        Route::post('/labor/contract', [LaborController::class, 'contract'])->middleware('CheckProject');
        Route::put('/labor/contract', [LaborController::class, 'storeContract'])->middleware('CheckProject');
        Route::patch('/labor/contract', [LaborController::class, 'updateContract'])->middleware('CheckProject');

        Route::post('/labor/template', [LaborTemplateController::class, 'index']);
        Route::put('/labor/template', [LaborTemplateController::class, 'store']);
        Route::patch('/labor/template', [LaborTemplateController::class, 'update']);

        Route::get('/reimburse/{id}', [ReimburseController::class, 'show']);
        Route::post('/reimburse', [ReimburseController::class, 'index'])->middleware('CheckProject');
        Route::post('/reimburse/cost', [ReimburseController::class, 'cost'])->middleware('CheckProject');
        Route::post('/reimburse/type', [ReimburseController::class, 'type'])->middleware('CheckProject');
        Route::put('/reimburse', [ReimburseController::class, 'store'])->middleware('CheckProject');
        Route::patch('/reimburse', [ReimburseController::class, 'update'])->middleware('CheckProject');
        Route::delete('/reimburse/{id}', [ReimburseController::class, 'delete']);

        Route::get('/cert/{id}', [CertController::class, 'show']);
        Route::post('/cert', [CertController::class, 'index']);
        Route::post('/cert/all', [CertController::class, 'all']);
        Route::put('/cert', [CertController::class, 'store']);
        Route::patch('/cert', [CertController::class, 'update']);
        Route::delete('/cert/{id}', [CertController::class, 'delete']);

        Route::put('/cert/down', [CertController::class, 'storeDown'])->middleware('CheckProject');
        Route::get('/certDown/{id}', [CertController::class, 'down']);

        Route::post('/approve', [ApproveController::class, 'index']);
        Route::post('/approve/records', [ApproveController::class, 'records']);
        Route::post('/approve/costs', [ApproveController::class, 'costs'])->middleware('CheckProject');
        Route::post('/approve/sources', [ApproveController::class, 'sources'])->middleware('CheckProject');
        Route::get('/approve/{id}', [ApproveController::class, 'show']);
        Route::put('/approve', [ApproveController::class, 'store']);
        Route::patch('/approve/review', [ApproveController::class, 'review']);
        Route::patch('/approve/revoke', [ApproveController::class, 'revoke']);
        Route::post('/approve/wait', [ApproveController::class, 'wait']);

        Route::post('/approve/processess', [ApproveProcessesController::class, 'index'])->middleware('CheckProject');
        Route::put('/approve/processess', [ApproveProcessesController::class, 'store'])->middleware('CheckProject');
        Route::patch('/approve/processess', [ApproveProcessesController::class, 'update'])->middleware('CheckProject');
        Route::delete('/approve/processess/{id}', [ApproveProcessesController::class, 'delete']);

        Route::get('/capitalize/{id}', [CapitalizeController::class, 'show']);
        Route::post('/capitalize', [CapitalizeController::class, 'index']);
        Route::put('/capitalize', [CapitalizeController::class, 'store']);
        Route::patch('/capitalize', [CapitalizeController::class, 'update']);

        Route::get('/leave/{id}', [LeaveController::class, 'show']);
        Route::post('/leave', [LeaveController::class, 'index']);
        Route::put('/leave', [LeaveController::class, 'store']);
        Route::patch('/leave', [LeaveController::class, 'update']);

        Route::get('/stamp/{id}', [StampController::class, 'show']);
        Route::post('/stamp', [StampController::class, 'index']);
        Route::put('/stamp', [StampController::class, 'store']);
        Route::patch('/stamp', [StampController::class, 'update']);

        Route::get('/down/{id}', [DownController::class, 'show']);
        Route::post('/down', [DownController::class, 'index']);
        Route::put('/down', [DownController::class, 'store']);
        Route::patch('/down', [DownController::class, 'update']);

        Route::get('/supplier/{id}', [SupplierController::class, 'show']);
        Route::post('/supplier', [SupplierController::class, 'index']);
        Route::post('/supplier/all', [SupplierController::class, 'all']);
        Route::put('/supplier', [SupplierController::class, 'store']);
        Route::patch('/supplier', [SupplierController::class, 'update']);
        Route::delete('/supplier/{id}', [SupplierController::class, 'delete']);

        Route::get('/team/{id}', [TeamController::class, 'show']);
        Route::post('/team', [TeamController::class, 'index']);
        Route::post('/team/all', [TeamController::class, 'all']);
        Route::put('/team', [TeamController::class, 'store']);
        Route::patch('/team', [TeamController::class, 'update']);
        Route::delete('/team/{id}', [TeamController::class, 'delete']);

        Route::get('/reference/material/{id}', [ReferenceMaterialController::class, 'show']);
        Route::post('/reference/material', [ReferenceMaterialController::class, 'index']);
        Route::put('/reference/material', [ReferenceMaterialController::class, 'store']);
        Route::patch('/reference/material', [ReferenceMaterialController::class, 'update']);
        Route::delete('/reference/material/{id}', [ReferenceMaterialController::class, 'delete']);

        Route::get('/reference/manual/{id}', [ReferenceManualController::class, 'show']);
        Route::post('/reference/manual', [ReferenceManualController::class, 'index']);
        Route::put('/reference/manual', [ReferenceManualController::class, 'store']);
        Route::patch('/reference/manual', [ReferenceManualController::class, 'update']);
        Route::delete('/reference/manual/{id}', [ReferenceManualController::class, 'delete']);

        Route::get('/hazard/{id}', [HazardController::class, 'show']);
        Route::post('/hazard', [HazardController::class, 'index']);
        Route::put('/hazard', [HazardController::class, 'store']);
        Route::patch('/hazard', [HazardController::class, 'update']);

        Route::get('/hazard/{id}', [HazardController::class, 'show']);
        Route::post('/hazard', [HazardController::class, 'index']);
        Route::put('/hazard', [HazardController::class, 'store']);
        Route::patch('/hazard', [HazardController::class, 'update']);

        Route::get('/construction/diary/id/{id}', [ConstructionDiaryController::class, 'showId']);
        Route::get('/construction/diary/{date}', [ConstructionDiaryController::class, 'show']);
        Route::post('/construction/diary', [ConstructionDiaryController::class, 'index']);
        Route::put('/construction/diary', [ConstructionDiaryController::class, 'store']);
        Route::patch('/construction/diary', [ConstructionDiaryController::class, 'update']);

        Route::get('/scene/{id}', [SceneController::class, 'show']);
        Route::post('/scene', [SceneController::class, 'index']);
        Route::put('/scene', [SceneController::class, 'store']);
        Route::patch('/scene', [SceneController::class, 'update']);

        Route::get('/imprest/{id}', [ImprestController::class, 'show']);
        Route::post('/imprest', [ImprestController::class, 'index']);
        Route::put('/imprest', [ImprestController::class, 'store']);
        Route::patch('/imprest', [ImprestController::class, 'update']);

        Route::get('/suggest/{id}', [SuggestController::class, 'show']);
        Route::post('/suggest', [SuggestController::class, 'index']);
        Route::put('/suggest', [SuggestController::class, 'store']);
        Route::patch('/suggest', [SuggestController::class, 'update']);
        Route::patch('/suggest/status', [SuggestController::class, 'updateStatus']);

        Route::get('/other/{id}', [OtherController::class, 'show']);
        Route::post('/other', [OtherController::class, 'index']);
        Route::put('/other', [OtherController::class, 'store']);
        Route::patch('/other', [OtherController::class, 'update']);

        Route::post('/statistics', [StatisticsController::class, 'index'])->middleware('CheckProject');
        Route::post('/statistics/costs', [StatisticsController::class, 'costs'])->middleware('CheckProject');
        Route::post('/statistics/finance/costs', [StatisticsController::class, 'financeCosts'])->middleware('CheckProject');
        Route::post('/statistics/overview', [StatisticsController::class, 'overview'])->middleware('CheckProject');




    });
});